﻿using DLLmySQL;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;


public class OperLog
{
    public static readonly object objLock = new object();

    public static string strCnn = ConfigurationSettings.AppSettings["DataBaseString"];

    public static void log(string title,string user_identity)
    {
        try
        {


            //CmySQL.GetDataTbale(strCnn, " INSERT INTO `oper_log`(`title`,`user_identity`, `oper_time`) VALUES ( '" + title + "','" + user_identity + "', now());");


        }
        catch (Exception)
        {
            //throw new Exception(ex.Message);
        }
    }

    public static void log(string title, string path, string user_id, string user_identity,string content,string messages)
    {
        try
        {

            string strSQL = " INSERT INTO `oper_log`(`title`,`path`,`user_id`,`user_identity`,`content`,`message`, `oper_time`, `main_dist`, `maker`) " +
                " VALUES ( '" + title + "','" + path + "','" + user_id + "','" + user_identity + "','" + content + "','" + messages + "', now(),'A','operlog')";

            //LogBLL.Err(strSQL);

            CmySQL.GetDataTbale(strCnn,strSQL );


        }
        catch (Exception)
        {
            //throw new Exception(ex.Message);
        }
    }

}

